<?xml version='1.0' encoding='utf-8'?>
<content>
<wk:arctype type='son' field="id,fid,description,litpic">
<?php 
	$id = $_field['id'];
	$sql = "SELECT * FROM `".C('DB_PREFIX')."addondiyvideo` WHERE `typeid`='$id'";
	$query = mysql_query($sql);
	while($row=mysql_fetch_array($query)){
	$count=mysql_num_rows($query);
}
?>
<category>
<title><field name='typename' />  (<?php echo $count; ?>)</title>
<desc><![CDATA[<field name='description' />]]></desc>
<xml><field name='id' /></xml>
</category>
</wk:arctype>
</content>